<div style="min-height:120px;">
	<p>{$html}</p>
    <div class="schedulebox" id="schedulebox-{$info.id}"></div>
    
    <form id="schedulebox-{$info.id}form" action="{:U('schedule', array('id' => $info['id']))}"></form>
    <div id="schedulebox-{$info.id}pages"></div>
    
    <?php if($info['state']!='3'&&$info['state']!='0'){ ?>
    <hr>
    <div id="passform-{$info.id}-integral">
        <if condition="$info['integral']">
            <table class="table table-bordered" style="border:1px solid #ccc; margin-bottom:10px;">
                <thead bgcolor="#F7F7F7">
                    <tr>
                        <th width="80">姓名</th>
                        <th>奖票</th>
                        <volist name="info['integral']" id="rvo">
                            <volist name="rvo['integral']" id="ivo">
                                <th>{$InteTypeList[$key]}</th>
                            </volist>
                        </volist>
                    </tr>
                </thead>
                <volist name="info['integral']" id="rvo">
                    <assign name="midk" value="$key" />
                    <tr>
                        <td style="line-height:34px;">{$rvo.name}</td>
                        <td>
                        	<!--<input class="form-control" type="number" name="ticket" value="{:intval($userInfo['tiketnum'])}" min="0">-->
                            <div class="icheck">
                                <div class="square-red single-row"> 
                                    <input type="checkbox" checked name="ticket" value="1"/>
                                    <label for="ticket" class="label-block">奖票</label>
                                </div>
                            </div>
                        </td>
                        <volist name="rvo['integral']" id="ivo">
                            <td><input class="form-control" type="hidden" name="integralmember_id[]" value="{$midk}">
                                <if condition="$giveintegral">
                                    <input class="form-control" type="number" name="integralnum[]" value="{$ivo}">
                                    <else/>
                                    {$ivo}
                                    <input class="form-control" type="hidden" name="integralnum[]" value="{$ivo}">
                                </if>
                                <input class="form-control" type="hidden" name="integraltype[]" value="{$key}"></td>
                        </volist>
                    </tr>
                </volist>
            </table>
        </if>
    </div>
    
    <div class="panel" style="border:1px solid #ccc; margin-bottom:0;">
        <form class="checkoutform" id="passform-{$info.id}" action="{:U('pass')}">
            <div id="passform-{$vo.id}-integralbox" class="hidden">
            </div>
            <textarea class="form-control input-lg p-text-area" name="comment" rows="2" placeholder="填写意见">{$info.myschedule.comment}</textarea>
            <input type="hidden" value="0" name="status">
            <input type="hidden" name="mission_id" value="{$info['id']}">
        </form>
        <footer class="panel-footer" style="padding:5px;">
            <ul class="nav nav-pills p-option">
                <li style="line-height:30px; width:100%;"> 申请人：{$info['proposername']}
                    <gt name="memberInfo['pid']" value="0">
                        <button onClick="passform{$info.id}(2);" class="btn btn-danger btn-sm pull-right">递交上级</button>
                    </gt>
                    <button style="margin-right:5px;" onClick="passform{$info.id}(1);" class="btn btn-post btn-sm pull-right">通过</button>
                    <button style="margin-right:5px;" class="btn btn-default btn-sm pull-right" onClick="passform{$info.id}(0);" >驳回</button>
                </li>
            </ul>
        </footer>
    </div>
    <?php } ?>
    <script>
      $('#schedulebox-{$info.id}').ajaxlist({autoload:true});
                                        function passform{$info.id}(status){
                                            
                                            var sendinput = '<input type="hidden" name="send" value="1">';
                                            $('#passform-{$info.id} input[name="send"]').remove();
                                            if(status == 2){
                                                status = 1;
                                                $('#passform-{$info.id}').append(sendinput);
                                            }
                                            
                                            $('#schedulebox-{$info.id}').click();
                                            $('#passform-{$info.id}').find('input[name="status"]').val(status);
                                            $('#passform-{$info.id}-integral').find('input[type="number"]').each(function(index, element) {
                                                $(this).attr('value', $(this).val());
                                            });
                                            $('#passform-{$vo.id}-integralbox').html($('#passform-{$info.id}-integral').html());
                                            var data = $('#passform-{$info.id}').serialize();
                                            $.ajax({
                                                url:$('#passform-{$info.id}').attr('action'),
                                                data:data,
                                                type:'POST',
                                                dataType:"json",
                                                success: function(ret){
                                                    //失败则发出提醒信息
                                                    if(ret.status==0){
                                                        $.ThinkBox.error('系统繁忙，请稍候重试',{'delayClose':1000,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
                                                    }
                                                    //成功了
                                                    if(ret.status == 1){
                                                        
                                                        $('#schedulebox-{$info.id}form').trigger('submit');
                                                        if(ret.state == 3){
                                                            $('#formBox-{$info.id}').removeClass('a');
                                                            $('#formBox-{$info.id}').addClass('p');
                                                        }
                                                        if(ret.state == 0){
                                                            $('#formBox-{$info.id}').removeClass('p');
                                                            $('#formBox-{$info.id}').addClass('a');
                                                        }
                                                        if(ret.state==2){
                                                            $('#formBox-{$info.id}').removeClass('p').removeClass('a');
                                                        }
                                                        
                                                        
                                                    }
                                                }
                                            });
											//异步刷新
											$("#TaskMissionListform").submit();
											//关闭最前面的窗口
											var obj='';
											for( obj in art.dialog.list){}
											art.dialog.list[obj].close();
                                        }
                                        
        $('.aui_state_focus .checkoutform:eq(0)').removeClass('checkoutform');
        $('#schedulebox-{$info.id}').parents('.aui_content').addClass('wbg');
        $('#schedulebox-{$info.id}').parents('.aui_dialog').find('.trfooter').addClass('hidden1');
        
        
    </script>
    <style>
        .hidden1{display:none !important;}
        .wbg{background:#fff;}
    </style>

</div>